#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'libb@anchent.com'

import os
import time
from multiprocessing import Process, Queue


def f(name, que):
    print("start process current pid: %d" % os.getpid())
    time.sleep(1)
    que.put(['hello' + str(name)])


if __name__ == '__main__':
    process_list = []
    q = Queue()
    for i in range(10):
        p = Process(target=f, args=(i, q))
        p.start()
        process_list.append(p)
        print(q.get())

    for j in process_list:
        j.join()
